home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 2207 / 2207.xpi / install.js < prev    next >
Text File  |  2010-01-28  |  2KB  |  65 lines

  1. var XpiInstaller={extFullName:"Cooliris Previews",extShortName:"cooliris",extVersion:"2.7.4.0421",extAuthor:"Cooliris Inc, www.coolpreviews.com",extLocaleNames:["en-US"],extSkinNames:["classic"],extPostInstallMessage:"Success! Please restart your browser to finish the installation.",profileInstall:true,silentInstall:true,install:function(){
  2. var _1=this.extShortName+".jar";
  3. var _2=getFolder("Profile","extensions/"+"{CE6E6E3B-84DD-4cac-9F63-8D2AE4F30A4B}");
  4. var _3=Install.getFolder(_2,"chrome");
  5. this.parseArguments();
  6. if(File.exists(Install.getFolder(_3,_1))){
  7. if(!this.silentInstall){
  8. Install.alert("Updating existing Profile install of "+this.extFullName+" to version "+this.extVersion+".");
  9. }
  10. this.profileInstall=true;
  11. }else{
  12. if(!this.silentInstall){
  13. this.profileInstall=Install.confirm("Install "+this.extFullName+" "+this.extVersion+" to your Profile directory (OK) or your Browser directory (Cancel)?");
  14. }
  15. }
  16. var _4=this.extFullName+" "+this.extVersion;
  17. var _5="/"+this.extAuthor+"/"+this.extShortName;
  18. Install.initInstall(_4,_5,this.extVersion);
  19. var _6;
  20. if(this.profileInstall){
  21. _6=_3;
  22. }else{
  23. _6=Install.getFolder("chrome");
  24. }
  25. Install.addFile(null,"chrome/"+_1,_6,null);
  26. var _7=Install.getFolder(_6,_1);
  27. var _8=this.profileInstall?Install.PROFILE_CHROME:Install.DELAYED_CHROME;
  28. Install.registerChrome(Install.CONTENT|_8,_7,"content/"+this.extShortName+"/");
  29. for(var _9 in this.extLocaleNames){
  30. var _a="locale/"+this.extShortName+"/"+this.extLocaleNames[_9]+"/";
  31. Install.registerChrome(Install.LOCALE|_8,_7,_a);
  32. }
  33. for(var _b in this.extSkinNames){
  34. var _a="skin/"+this.extSkinNames[_b]+"/"+this.extShortName+"/";
  35. Install.registerChrome(Install.SKIN|_8,_7,_a);
  36. }
  37. var _c=Install.performInstall();
  38. if(_c==Install.SUCCESS||_c==Install.REBOOT_NEEDED){
  39. if(!this.silentInstall&&this.extPostInstallMessage){
  40. Install.alert(this.extPostInstallMessage);
  41. }
  42. }else{
  43. this.handleError(_c);
  44. return;
  45. }
  46. },parseArguments:function(){
  47. var _d=Install.arguments;
  48. if(_d=="p=0"){
  49. this.profileInstall=false;
  50. this.silentInstall=true;
  51. }else{
  52. if(_d=="p=1"){
  53. this.profileInstall=true;
  54. this.silentInstall=true;
  55. }
  56. }
  57. },handleError:function(_e){
  58. if(!this.silentInstall){
  59. Install.alert("Error: Could not install "+this.extFullName+" "+this.extVersion+" (Error code: "+_e+")");
  60. }
  61. Install.cancelInstall(_e);
  62. }};
  63. XpiInstaller.install();
  64.  
  65.